var onLogin=function(f){
	if(!f.login_name.value){
		alert('请输入登录名称!');
		f.login_name.focus();
		return ;
	}
	if(!f.login_pwd.value){
		alert('请输入登录密码!');
		f.login_pwd.focus();
		return ;
	}
	Ext.Ajax.request({
	    url:'/usercontrol/sysuser_login/',
	    method : 'post',
	    params:{
	    	login_name:f.login_name.value,
	    	login_pwd:f.login_pwd.value
	    },
	    success:function(response){
	        var results =  Ext.decode(response.responseText);
	        if(results.success){
	        	window.location.replace('/main/');
	        }else{
	        	alert(results.message);
	        	f.reset();
	        	f.login_name.focus();
	        }
	    }
	});	
}

